package net.slteam.base;


import com.baomidou.mybatisplus.annotation.TableField;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;

/**
 * ClassName: BaseBeanWithTimeAndUser
 * Description:
 * date: 9/28/21 3:39 PM
 *
 * @author calm
 * @since JDK 1.8
 */
@MappedSuperclass
public class BaseBeanWithTimeAndUser extends BaseBeanWithTime implements ITranslatorUserName{

    @Column(columnDefinition = "char(64) comment '生成者'")
    private String creator;

    @Column(columnDefinition = "char(64) comment '更新者'")
    private String updater;
    
    @Transient
    @TableField(exist = false)
    String creatorName;

    @Transient
    @TableField(exist = false)
    String updaterName;

    @Override
    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    @Override
    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }
    
    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }
    
    public void setUpdaterName(String updaterName) {
        this.updaterName = updaterName;
    }
    
    @Override
    public String toString() {
        return "BaseBeanWithTimeAndUser{" +
                "creator='" + creator + '\'' +
                ", updater='" + updater + '\'' +
                "} " + super.toString();
    }
}
